-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BugFix] fix incorrect result of yearweek #51065
Conversation
@rohitrs1983 thanks for fixing this. but I'd like maybe you can add more test cases, to make sure this function's behaviour is consistent with mysql's. maybe you can refer to this PR's comment: https://github.com/StarRocks/starrocks/pull/47365/files#diff-fc27f5c55e94b69f881f2184c34d746a5495999f61b05c724b58e9259ca132e0R1457-R1463
|
@rohitrs1983 you can use following mysql statement to generate output for your test cases
|
Signed-off-by: Rohit Satardekar <[email protected]>
@dirtysalt thanks for the comments. have added additional test cases. executed the above test on mysql and compared against SR output. |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.3 |
✅ Backports have been created
|
Signed-off-by: Rohit Satardekar <[email protected]> (cherry picked from commit f16c696)
Co-authored-by: Rohit Satardekar <[email protected]>
@rohitrs1983 again, thanks for your contribution |
Why I'm doing:
What I'm doing:
mysql> select yearweek('2023-12-31', 2), yearweek('2024-01-01', 2);
+---------------------------+---------------------------+
| yearweek('2023-12-31', 2) | yearweek('2024-01-01', 2) |
+---------------------------+---------------------------+
| 202353 | 202353 |
+---------------------------+---------------------------+
Fixes #51034
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: